home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-04-20 | 1.5 KB | 63 lines | [TEXT/CWIE] |
- // ===========================================================================
- // UDebugging.cp ©1994 Metrowerks Inc. All rights reserved.
- // ===========================================================================
- //
- // Utility functions for debugging
-
- #ifdef PowerPlant_PCH
- #include PowerPlant_PCH
- #endif
-
- #include <UDebugging.h>
-
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- #endif
-
- // Global variables for specifying the action to take for
- // a Throw and a Signal
-
- EDebugAction gDebugThrow = debugAction_Nothing;
- EDebugAction gDebugSignal = debugAction_Nothing;
-
-
- const short ALRT_ThrowAt = 251;
- const short ALRT_SignalAt = 252;
-
-
- // ---------------------------------------------------------------------------
- // • AlertThrowAt
- // ---------------------------------------------------------------------------
- // Display an Alert Box when a Throw occurs
-
- void
- UDebugging::AlertThrowAt(
- unsigned char *inError,
- unsigned char *inFile,
- long inLine)
- {
- Str15 lineStr;
- ::NumToString(inLine, lineStr);
-
- ::ParamText(inError, inFile, lineStr, "\p");
- ::StopAlert(ALRT_ThrowAt, nil);
- }
-
-
- // ---------------------------------------------------------------------------
- // • AlertSignalAt
- // ---------------------------------------------------------------------------
- // Display an Alert Box when a Signal occurs
-
- void
- UDebugging::AlertSignalAt(
- unsigned char *inTestStr,
- unsigned char *inFile,
- long inLine)
- {
- Str15 lineStr;
- ::NumToString(inLine, lineStr);
-
- ::ParamText(inTestStr, inFile, lineStr, "\p");
- ::StopAlert(ALRT_SignalAt, nil);
- }